﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HeathCareSystem.wuc
{
    public partial class wucTimBenhNhan : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ddlLoaiBenh.Items.Add(new ListItem("", ""));
            List<LoaiBenhDTO> lst = LoaiBenhBUS.DanhSachBenh();
            foreach (LoaiBenhDTO item in lst)
            {
                ddlLoaiBenh.Items.Add(new ListItem(item.tenBenh, item.maBenh.ToString()));
            }           
        }

        protected void btnTimKiem_Click(object sender, EventArgs e)
        {
            string tenBenhNhan = txtTen.Text;
            string ngaySinh = txtNgaySinh.Text;
            string loaiBenh = ddlLoaiBenh.Text;

            BenhNhanBUS bnBus = new BenhNhanBUS();
            DataTable dt = bnBus.TimKiemBenhNhan(tenBenhNhan, ngaySinh, loaiBenh);
        }
    }
}